package org.example.server.controller;

import lombok.RequiredArgsConstructor;
import org.example.common.result.Result;
import org.example.pojo.dto.userRegistDTO;
import org.example.server.sever.userService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class regist {

    private final userService userServiceimpl;

    @RequestMapping("/register")
    public Result<Object> regist(@RequestBody userRegistDTO dto) {

       return userServiceimpl.existsByIdAndRegist(dto);
    }
}
